// 初始化按钮状态

export default function updateButtonStatus() {
    const {orgVal, pageInfo, hasSearched, nodetype, page} = this.state;
    const flag = !parseInt(pageInfo.total);
    this.props.button.setButtonDisabled({
        query: !orgVal.refpk && nodetype === 'ORG_NODE',
        refresh: (!orgVal.refpk && nodetype === 'ORG_NODE') || !hasSearched,
        add: !orgVal.refpk && nodetype === 'ORG_NODE',
        listrpt: flag,
        print: flag,
        output: flag
    });
}
